<style>

/* 操作型弹出浮层-默认居中 */
.m-layer,.m-layer .lymask {
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.m-layer {
	display: none;
	position: fixed;
	_position: absolute;
	z-index: 999;
}

.m-layer .lymask {
	position: absolute;
	background: #000;
	opacity: 0.6;
	filter: alpha(opacity =     60);
}

.m-layer .lytable {
	table-layout: fixed;
	width: 100%;
	height: 100%;
}

.m-layer .lytd {
	width: 100%;
	height: 100%;
	vertical-align: middle;
}

.m-layer .lywrap {
	position: relative;
	width: 350px;
	margin: 0 auto;
}

.m-layer .lytt {
	position: relative;
	padding: 10px;
	height: 20px;
	margin: 0 0 -1px;
	line-height: 20px;
	border-bottom: 1px solid #ddd;
	background: #fafafa;
}

.m-layer .lytt h2 {
	float: left;
	font-size: 16px;
}

.m-layer .lyclose {
	float: right;
	font-weight: bold;
	font-family: arial;
	font-size: 24px;
	_font-size: 16px;
	color: #ccc;
	text-shadow: 0 1px #fff;
	cursor: pointer;
}

.m-layer .lyclose:hover {
	color: #aaa;
}

.m-layer .lyct:last-child,.m-layer .lybt {
	
}

.m-layer .lyct:first-child {
	
}

.m-layer .lyct {
	background: #fff;
	font-size: 14px;
}

.m-layer .lybt {
	height: 30px;
	line-height: 30px;
	padding: 10px;
	margin: -1px 0 0;
	border-top: 1px solid #ddd;
	background: #f7f7f7;
}

.m-layer .lyother {
	float: left;
	color: #999;
}

.m-layer .lybtns {
	float: right;
}

.m-layer .lybtns button {
	float: left;
	margin-left: 10px;
}

/* 显示 */
.m-layer-show {
	display: block;
}

</style>
<script type="text/javascript" >
/*!
 * Caolj JavaScript Library v1.0.0
 * Date: 2014-09-25 10:42 
 */
function openMessager(content,tip,cancelable,callback){
	$("#_MESSAGER_CONTENT_").html(content);
	$("#_MESSAGER_TIP_").html(tip);
	if(!cancelable){
		$("#_MESSAGE_CANCEL_").hide();
	}else{
		$("#_MESSAGE_CANCEL_").show();
		
	}
	$("#_MESSAGER_").show();
	$("#_MESSAGER_OK_").unbind();
	$("#_MESSAGER_OK_").bind("click", function(){
		$("#_MESSAGER_").hide();
		callback();
	});
}  

function closeMessager(){
	$("#_MESSAGER_").hide();
	return false;
}

function openWindow(title, url, callback, opts){
	$("#_WINDOW_IF").attr("src",url);
	$("#_WINDOW_IF").attr("width","100%");
	
	if(opts&&opts.width){
		$("#_WINDOW_BODY_").width(opts.width);
		//$("#_WINDOW_BODY_").animate({width:opts.width});
	}else{
		$("#_WINDOW_BODY_").width($(window).width()*0.8);
	}
	
	if(opts&&opts.height){
		$("#_WINDOW_IFRAME_").height(opts.height);
	}else{
		//$("#_WINDOW_IFRAME_").animate({height: $(window).height()*0.7});
		$("#_WINDOW_IFRAME_").height($(window).height()-5);
	}
	
	$("#_WINDOW_").show();
	if(opts&&opts.closeBtnName){
		$("#_WINDOW_CLOSE_").html(opts.closeBtnName);
	}
	$("#_WINDOW_CLOSE_").unbind();
	$("#_WINDOW_CLOSE_").bind("click", function(){
		closeWindow();
		callback();
	});
}
function closeWindow(){
	//$("#_WINDOW_BODY_").animate({width:0},function(){
		$("#_WINDOW_").hide();
	//});
	//$("#_WINDOW_IFRAME_").animate({height:0},function(){
	//	$("#_WINDOW_").hide();
	//});
	$("#_WINDOW_IF").attr("src","");
}
</script>
<!-- 通用提示框 -->
<div class="m-layer m-layer-show" id="_MESSAGER_" style="display:none;">
    <div class="lymask"></div>
    <table class="lytable"><tbody><tr><td class="lytd">
    <div class="lywrap">
	    <div class="lytt" style="height:40px;">
	    	<h2 id="_MESSAGER_TITLE_" class="u-tt" style="margin:0px;">系统提示</h2>
	    	<span class="lyclose" onclick="closeMessager();">×</span></div>
	    <div class="lyct" style="padding:20px;">
	        <p id="_MESSAGER_CONTENT_" style="margin-top:20px;margin-bottom:20px;font-size:16px;">默认固定居中，有遮罩，按钮区标题区都可删</p>
	    </div>
	    <div class="lybt" style="height:50px;">
	        <div class="lyother">
	            <p id="_MESSAGER_TIP_"></p>
	        </div>
	        <div class="lybtns">
	            <button type="button" id="_MESSAGER_OK_" class="btn">确定</button>
	            <button type="button" id="_MESSAGE_CANCEL_" onclick="closeMessager();" class="btn">取消</button>
	        </div>
	    </div>
    </div></td></tr></tbody></table>
</div>

<!-- 通用弹出框Iframe -->
<div class="m-layer m-layer-show" id="_WINDOW_" style="display:none;">
    <div class="lymask"></div>
    <table class="lytable">
    	<tbody>
    		<tr>
    			<td class="lytd">
				    <div class="lywrap" id="_WINDOW_BODY_" style="width:70%;">
					    <div id="_WINDOW_IFRAME_" class="lyct" style="height:0px;">
					    	<iframe id="_WINDOW_IF" src="" frameborder=0 style="height:100%;" scrolling="no"></iframe>
					    </div>
					    <div class="lybt" style="height:50px;width:100%;display:none;">
					        <div class="lybtns">
					            <button type="button" id="_WINDOW_CLOSE_" onclick="closeWindow();" class="btn">关闭窗口</button>
					        </div>
					    </div>
				    </div>
				</td>
			</tr>
		</tbody>
	</table>
</div>